﻿using GalaSoft.MvvmLight.Command;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 安检系统.Model;

namespace 安检系统.ViewModel
{
    public class MainViewModel : BaseViewModel
    {
        public ObservableCollection<Record> _recordList = new ObservableCollection<Record>();
        public ObservableCollection<Car> _item3 = new ObservableCollection<Car>();
        public ObservableCollection<ItemViewModel> _item1 = new ObservableCollection<ItemViewModel>();
        public ObservableCollection<ItemViewModel> _item2 = new ObservableCollection<ItemViewModel>();
        public Record _recordModel=new Record();
        public QueryParamModel _queryParamModel = new QueryParamModel();
        public MainViewModel()
        {
            _queryParamModel.queryStatus = "0";
        }

        public QueryParamModel queryParam
        {
            get { return _queryParamModel; }
            set
            {
                _queryParamModel = value;
                RaisePropertyChanged("queryParam");
            }
        }

        public ObservableCollection<Record> RecordList
        {
            get { return _recordList; }
            set
            {
                _recordList = value;
                RaisePropertyChanged("recordList");
            }
        }

        public ObservableCollection<Car> item3
        {
            get { return _item3; }
            set
            {
                _item3 = value;
                RaisePropertyChanged("item3");
            }
        }
        public ObservableCollection<ItemViewModel> item1
        {
            get {return _item1; }
            set
            {
                _item1 = value;
                RaisePropertyChanged("item1");
            }
        }

        public ObservableCollection<ItemViewModel> item2
        {
            get { return _item2; }
            set
            {
                _item2 = value;
                RaisePropertyChanged("item2");
            }
        }

        public Record recordParam
        {
            get { return _recordModel; }
            set
            {
                _recordModel=value;
                RaisePropertyChanged("recordModel");
            }
        }
        
        public int _Count01;
        public int Count01
        {
            get { return _Count01; }
            set
            {
                if (_Count01 != value)
                {
                    _Count01 = value;
                    RaisePropertyChanged("Count01");
                }
            }
        }

        public int _Count02;
        public int Count02
        {
            get { return _Count02; }
            set
            {
                if (_Count02 != value)
                {
                    _Count02 = value;
                    RaisePropertyChanged("Count02");
                }
            }
        }
    }
   
}
